package com.exam.api.modules.system.dto;

import com.exam.api.modules.system.domain.TblMenu;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 菜单更新DTO
 *
 * @author bcheng
 */
@Schema(description = "菜单更新DTO")
@EqualsAndHashCode(callSuper = true)
@Data
public class MenuUpdateDTO extends MenuAddDTO {

    /**
     * 菜单id
     */
    @Schema(description = "菜单id")
    @NotNull
    private Long menuId;

    @Override
    public TblMenu converter() {
        TblMenu menu = super.converter();
        menu.setMenuId(menuId);
        return menu;
    }
}
